• File: config.php
  • Full Path: C:/htdocs/reeft_gps_test/REEFTintegrationLog/config/config.php
  • Date Modified: 06/06/2025 10:28 AM
  • File size: 17.97 KB
  • MIME-type: text/x-php
  • Charset: utf-8
<?php
//======================================================================================
//
// Function: REEFT integration Config defaults
//
// Programmer: JKJ
// Date      : 2025-04-15
//
//
//======================================================================================
//
//======================================================================================
// Copyright Reeft A/S (c) - 2025+
//======================================================================================

	//======================================================================================
	//                S U P E R   G E N E R A L   C O N F I G   V A L U E S
	//======================================================================================

	//======================================================================================
	// Date format - presentation
	//======================================================================================
	//	*YMD 	= 2022-12-31
	//	*DMY 	= 31-12-2022
	//	*USA 	= 12/31/2022
	//	*ISO 	= 2022-12-31
	//	*EUR 	= 31.12.2022
	//	*JIS 	= 2022-12-31
	//	*LONGJUL = 2022/365
	//	*PRETTY 	= 1. Marts 2022
	//	*PRETTY1	= 1. Mar. 2022
	//	*PRETTY2	= Mandag, 1. Marts 2022
	//======================================================================================
	$DFT_DATE_DISPLAY_FORMAT = '*DMY';

	//======================================================================================
	// Intergration values
	//======================================================================================
	$DFT_VALID_EXTENSIONS 					= 'csv|txt|webservice|xml|json';
	$DFT_VALID_DECIMAL_SEPERATOR 			= ',|.';
	$DFT_VALID_FILEFORMAT_SEPERATOR 		= ';%,%|%~';
	$DFT_VALID_CODE_PAGE 					= 'UTF-8|windows-1250|windows-1252';
	
	//======================================================================================
	// Webservice URL's - control by the keyword $DFT_RUN_MODE
	//======================================================================================
	// *PROD 		: Production server running in Apache server named WEBSERVER port 80
	// *PROD_TEST	: Production test server running in Apache server named TEStSERVER - port 81
	//
	// *TEST 		: Test server running in Apache server named TEStSERVER - port 81
	// *TEST_PROD	: Test server running in Apache server named TEStSERVER - port 80
	//
	// Default is *TEST
	//
	// $DFT_CONNECTION_TYPE can be *IP or *DNS
	// Default is *DNS
	//
	// The keyword for the DATAHUB url is: DFT_WEBSERVICE_URL_DATAHUB
	//======================================================================================
	$DFT_RUN_MODE 			= '*PROD';
	// $DFT_RUN_MODE 			= '*TEST';

	$DFT_CONNECTION_TYPE 	= '*IP';
	$DFT_CONNECTION_TYPE 	= '*DNS';
	
	// Dirs
	if ( $DFT_RUN_MODE == '*TEST' ) {
		$DFT_DIR_PATH							= 'C:/REEFTintegration_test/server/customer/customer_data'; // Azure 
		$DFT_CUST_DIR_PATH						= 'C:/REEFTintegration_test/server/customer'; // Azure 
		$DFT_MAIN_LOG_PATH						= 'C:/REEFTintegration_test/server/API_mobile/main_log'; // Azure 
		$CUSTOMER_LOG_DB_PATH					= 'C:/REEFTintegration_test/server/customer/customer_data/%1/data_log/integrationLog.sqlite'; // Azure %1 will be replaced with cust number
		
		$DFT_DIR_PATH 							= 'C:/xampp/htdocs/git/REEFT/REEFTintegration/server/customer/customer_data'; // Anja testing local
		$DFT_CUST_DIR_PATH 						= 'C:/xampp/htdocs/git/REEFT/REEFTintegration/server/customer'; // Anja testing local
		$DFT_MAIN_LOG_PATH						= 'C:/xampp/htdocs/git/REEFT/REEFTintegration/server/API_mobile/main_log'; // Azure 
		$CUSTOMER_LOG_DB_PATH					= 'C:/xampp/htdocs/git/REEFT/REEFTintegration/server/customer/customer_data/%1/data_log/integrationLog.sqlite'; // Anja testing local %1 will be replaced with cust number
	} else {
		$DFT_DIR_PATH							= 'C:/REEFTintegration/server/customer/customer_data'; // Azure 
		$DFT_CUST_DIR_PATH						= 'C:/REEFTintegration/server/customer'; // Azure
		$DFT_MAIN_LOG_PATH						= 'C:/REEFTintegration/server/API_mobile/main_log'; // Azure 		
		$CUSTOMER_LOG_DB_PATH					= 'C:/REEFTintegration/server/customer/customer_data/%1/data_log/integrationLog.sqlite'; // Azure %1 will be replaced with cust number
	}
	
	$DFT_PROGRAM_DIR	 					= 'data_program';
	$DFT_INPUT_DIR	 						= 'data_received';
	$DFT_OUTPUT_DIR	 						= 'data_export';
	$DFT_EXPORT_DONE_DIR					= 'data_export_done';
	$DFT_DONE_DIR	 						= 'data_done';
	$DFT_LOG_DIR	 						= 'data_log';
	$DFT_ERROR_DIR	 						= 'data_error';
	
	$DFT_DIR_PATH_LOG_TEMPLATE				= 'customer/customer_template/customer_id/data_log';
	$DFT_DB_LOG_TEMPLATE					= 'integrationLog.sqlite';
	$DFT_DIR_WHERE_TO_SAVE_DB_LOG			= 'data_log';
	
	$DFT_DIR_PATH_LOG_TEMPLATE_DUMMY		= 'customer/customer_template/customer_id/customer_dummy_for_git';
	$DFT_DB_LOG_TEMPLATE_DUMMY				= 'dummy.txt';
	
	$DFT_PATH_SAFETYFILE_TEMPLATE			= 'customer/customer_template/customer_id/customer_delete_check_file/i_must_be_deleted.txt';

	// tinyfilemanager variables
	$DFT_TINYFILEMANAGER_COPY_FROM_PATH		= 'customer/customer_template/tinyfilemanager/';
	$DFT_TINYFILEMANAGER_BASE_NAME			= 'tinyfilemanager/';
	$DFT_TINYFILEMANAGER_BASE_LINK			= 'customer/customer_data/%1/tinyfilemanager/tinyfilemanager.php'; // %1 will be replaced with cust number
	
	$DFT_TINYFILEMANAGER_COPY_PROGRAMS		= array('tinyfilemanager.php','translation.json','tinyfilemanager_config.php');

	//======================================================================================
	// Set known servers
	//======================================================================================

	// LOCAL (Anja)
	$DFT_LOCAL_SERVER 			= 'localhost/GIT/REEFT/REEFTintegrationLog';
	$DFT_LOCAL_SERVER_IP 		= '127.0.0.1/GIT/REEFT/REEFTintegrationLog';
	$DFT_LOCAL_SERVER_DNS 		= 'localhost/GIT/REEFT/REEFTintegrationLog';
	$DFT_LOCAL_SERVER_TEST_PORT	= '80';
	
	// LOCAL (Jan)
	// $DFT_LOCAL_SERVER 			= 'localhost/REEFT/REEFTintegrationLog';
	// $DFT_LOCAL_SERVER_IP 		= '127.0.0.1/REEFT/REEFTintegrationLog';
	// $DFT_LOCAL_SERVER_DNS 		= 'localhost/REEFT/REEFTintegrationLog';
	// $DFT_LOCAL_SERVER_TEST_PORT	= '80';

	// WEB
	$DFT_WEB_SERVER 			= 'localhost/REEFT/REEFTintegrationLog';
	$DFT_WEB_SERVER_IP 			= '127.0.0.1/REEFT/REEFTintegrationLog';
	$DFT_WEB_SERVER_DNS 		= 'reeft_gps.reeft.com/REEFTintegrationLog';
	// $DFT_WEB_SERVER_DNS 		= 'reeft_gps.reeft.com/reeftintegrationlog_test/REEFTintegrationLog';  //test
	$DFT_WEB_PROD_PORT			= '80';


	//======================================================================================
	// Set webservice URL
	//======================================================================================

	if ( $DFT_RUN_MODE == '*TEST' ) {

		// TEST
		if ( $DFT_CONNECTION_TYPE == '*IP' ) {

			$DFT_WEBSERVICE_URL	 = 'http://' . $DFT_LOCAL_SERVER_IP;
			$DFT_SERVER			 = $DFT_LOCAL_SERVER_IP;
			$DFT_SERVER_PORT	 = $DFT_LOCAL_SERVER_TEST_PORT;

		} else {

			$DFT_WEBSERVICE_URL	 = 'http://' . $DFT_LOCAL_SERVER_DNS;
			$DFT_SERVER 		 = $DFT_LOCAL_SERVER_DNS;
			$DFT_SERVER_PORT	 = $DFT_WEB_PROD_PORT;

		}
	}

	if ( $DFT_RUN_MODE == '*PROD' ) {

		// TEST
		if ( $DFT_CONNECTION_TYPE == '*IP' ) {

			$DFT_WEBSERVICE_URL	 = 'http://' . $DFT_WEB_SERVER_IP;
			$DFT_SERVER			 = $DFT_WEB_SERVER_IP;
			$DFT_SERVER_PORT	 = $DFT_WEB_SERVER_TEST_PORT;

		} else {

			$DFT_WEBSERVICE_URL	 = 'https://' . $DFT_WEB_SERVER_DNS;
			$DFT_SERVER 		 = $DFT_WEB_SERVER_DNS;
			$DFT_SERVER_PORT	 = $DFT_WEB_PROD_PORT;

		}
	}

	//======================================================================================
	// APIKEY
	//======================================================================================
	$DFT_API_KEY =  '4QdBalyOgn8HRk2EMR9fqzh1L74GSkt9Tp6EvTfzU374yxBQmFnGiFEmLo4PP46jWJ2fBL78vJL24gQ5VLOzBdnQv6a7xzyicuDlymkSZXqaPYEAEk6mfFFQB2r7GsVsYiMd8N54E2Ifkgja1YEzGvbqPOJGVWkClq3gXZPYqPRS9jXsIvxHQeXWoHq1zoK1HBwsTSzuL3b2fVinZgnDqRyNMGYwDYgCPTCnpiUoJdLuq7g6WLeaILsc2SA6eSX';

	//======================================================================================
	// Export options in tables
	//======================================================================================
	$DFT_EXPORT_TO_CSV_FIELDSEPARATOR 	= '|';


	//==========================================================================
	// Customer DB path
	//==========================================================================
	if ( $DFT_RUN_MODE == '*TEST' ) {
		$CUSTOMER_DATABASE_PATH = 'C:/REEFTintegration_test/server/customer/REEFT_integration.sqlite3'; // Azure 
		$CUSTOMER_DATABASE_PATH = 'C:/xampp/htdocs/git/REEFT/REEFTintegration/server/customer/REEFT_integration.sqlite3'; // Anja testing local
	} else {
		$CUSTOMER_DATABASE_PATH = 'C:/REEFTintegration/server/customer/REEFT_integration.sqlite3'; // Azure
	}

	//==========================================================================
	// Database to use - BE VERY VERY VERY CAREFULL ABOUT CHANGING THIS!!!
	//==========================================================================
	$DFT_DATABASE_TO_USE = '*MSSQL';
	$DFT_DATABASE_TO_USE = '*PGSQL';
	$DFT_DATABASE_TO_USE = '*MARIA_DB';
	$DFT_DATABASE_TO_USE = '*MYSQL';
	$DFT_DATABASE_TO_USE = '*SQLITE';

	//==========================================================================
	// Database type - not implementet yet
	//==========================================================================
	$DFT_DATABASE_TYPE = '*SERVER';
	$DFT_DATABASE_TYPE = '*CLOUD';
	$DFT_DATABASE_TYPE = '*LOCAL';

	//======================================================================================
	// Database placement
	//======================================================================================

	if ( $DFT_DATABASE_TYPE == '*SERVER') {
		$DFT_SQLLITE_IP 			= '\\\192.168.111.184\\\www\html\\\visual\\\ReeftStopTime\\\standard\light\\\sqlight\\\mainLog.sqlite';
		$DFT_SQLLITE_IP_MOVE_UP 	= '';
	}
	else if ( $DFT_DATABASE_TYPE == '*CLOUD') {
		$DFT_SQLLITE_IP 			= '/var/www/flexware.dk/reeft_data/%customer_data_dir%/mainLog.sqlite';
		$DFT_SQLLITE_IP_MOVE_UP 	= '';
	}
	else if ( $DFT_DATABASE_TYPE == '*LOCAL') {
		$DFT_SQLLITE_IP 			= $DFT_MAIN_LOG_PATH .'/mainLog.sqlite';
		$DFT_SQLLITE_IP_MOVE_UP 	= '../sqlight/mainLog.sqlite';
	}
	else {
		$DFT_SQLLITE_IP 			= $DFT_MAIN_LOG_PATH .'/mainLog.sqlite'; // Default
		$DFT_SQLLITE_IP_MOVE_UP 	= '';
	}

	//======================================================================================
	// Time zone
	// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
	//======================================================================================

	$DFT_CURRENT_TIMEZONE 		= 'Europe/Copenhagen';
	$DFT_CURRENT_TIMEZONE_01 	= 'America/New_York';
	$DFT_CURRENT_TIMEZONE_02 	= 'America/New_York';
	$DFT_CURRENT_TIMEZONE_03 	= 'Australia/Sydney';
	$DFT_CURRENT_TIMEZONE_04 	= 'Asia/Tokyo';
	$DFT_CURRENT_TIMEZONE_05 	= 'America/Los_Angeles';

	$DFT_CLOCK_SIZE 			= 'h3';

	//======================================================================================
	// Default languate
	//======================================================================================
	$DFT_LANGUAGE = 'da';
	$DFT_LANGUAGE = 'en';

	$DFT_DEFAULT_LANGUAGE 			= 'da';
	$DFT_ACTIVE_LANGUAGE 			= 'da|en|de|fr|nl|se|ru|it|jp|no|nz|au|ca|es|pt|gr|us|jm|do|xx';
	$DFT_ACTIVE_LANGUAGE 			= 'da|en';

	//$DFT_ACTIVE_COUNTRY_ISO_3166 	= 'dk|gb|fr|se|cn|jp';

	$DFT_DEFAULT_COUNTRY_ISO_3166	= 'dk';
	$DFT_ACTIVE_COUNTRY_ISO_3166 	= 'dk|gb';

	//======================================================================================
	// Icons shape
	//======================================================================================
	$DFT_SET_FONT_AWESOME_ICON_TYPE = 'duotone';

	$DFT_SET_FONT_AWESOME_ICON_TYPE = 'sharp-light';
	$DFT_SET_FONT_AWESOME_ICON_TYPE = 'light';

	$DFT_SET_FONT_AWESOME_ICON_TYPE = 'sharp-solid';
	$DFT_SET_FONT_AWESOME_ICON_TYPE = 'solid';

	$DFT_SET_FONT_AWESOME_ICON_TYPE = 'regular';
	$DFT_SET_FONT_AWESOME_ICON_TYPE = 'sharp-regular';

	$DFT_SET_FONT_AWESOME_ICON_TYPE = 'sharp-thin';
	$DFT_SET_FONT_AWESOME_ICON_TYPE = 'thin';

	//======================================================================================
	// Decimal notation - presentation
	//======================================================================================
	$DFT_DECIMAL_MASK 	= '1';

	// See: https://www.localeplanet.com/icu/en-150/index.html
	// Might not be supported in all browsers
	$DFT_DECIMAL_LOCALE	= 'en-150'; // English Europe
	$DFT_DECIMAL_LOCALE	= 'da-DK';	// Denmark

	if ( $DFT_DECIMAL_MASK == '1' )
	{
		$DFT_DECIMAL_SIGN 	= ',';
		$DFT_1000_SIGN 		= '.';
	}
	else if ( $DFT_DECIMAL_MASK == '2' )
	{
		$DFT_DECIMAL_SIGN 	= '.';
		$DFT_1000_SIGN 		= ',';
	}
	else if ( $DFT_DECIMAL_MASK == '3' )
	{
		$DFT_DECIMAL_SIGN 	= ',';
		$DFT_1000_SIGN 		= ' ';
	}
	else if ( $DFT_DECIMAL_MASK == '3' )
	{
		$DFT_DECIMAL_SIGN 	= '.';
		$DFT_1000_SIGN 		= ' ';
	}
	else if ( $DFT_DECIMAL_MASK == '4' )
	{
		$DFT_DECIMAL_SIGN 	= 'x';
		$DFT_1000_SIGN 		= 'y';
	}
	else
	{
		$DFT_DECIMAL_SIGN 	= ',';
		$DFT_1000_SIGN 		= '.';
	}

	//======================================================================================
	// Landing page after logon operator and administrator
	//======================================================================================
	$DFT_LANDING_PAGE_OPERATOR 	= 'menu_operator.php';
	$DFT_LANDING_PAGE_ADMIN 	= 'menu_main.php';

	//======================================================================================
	// Base URL
	//======================================================================================
	$DFT_BASE_URL			 	= '';



	$datamode = '';
	$fromDate = '2024-11-01';
	$toDate = '2024-12-01';

	$DFT_PIE_TITLE_HEADER_DISPLAY			= false;		// false,true
	$DFT_LEGEND_POSITION_DISPLAY			= true; 		// false,true
	$DFT_LEGEND_POSITION					= 'bottom'; 	// top,bottom
	$DFT_DURATIONTIME						= 0000; 		// Miliseconds

	$DFT_DATA_MODE_LEFT						= '*seconds';	// *seconds, *count
	$DFT_UPDATE_SEQ_SECONDS_LEFT			= 30; 			// Seconds
	$DFT_DATA_MODE_RIGHT					= '*seconds';	// *seconds, *count
	$DFT_UPDATE_SEQ_SECONDS_RIGHT			= 30; 			// Seconds
	$DFT_DISPLAY_LABLES_ON_PIE_CHART		= 'Y'; // Y/N

	$DFT_CHARTS_TO_SHOW						= '*BOTH'; // *LEFT, *RIGHT, *BOTH
	$DFT_IFRAME_WIDTH						= '100%';
	$DFT_IFRAME_HEIGHT						= '210px';
	$DFT_CANVAS_HEIGHT						= '180px';


	//======================================================================================
	// Various color codes
	//======================================================================================
	$DFT_LINE_STATUS_1001_TEXT = 'Line inactive';
	$DFT_LINE_STATUS_COLOR_1001 = '#0000A0';
	$DFT_LINE_STATUS_BGCOLOR_1001 = '#FFC107';
	$DFT_LINE_STATUS_FONTWEIGHT_1001 = 'bold';

	$DFT_LINE_STATUS_1002_TEXT = 'Line Active';
	$DFT_LINE_STATUS_COLOR_1002 = '#fff';
	$DFT_LINE_STATUS_BGCOLOR_1002 = '#17A2B8';
	$DFT_LINE_STATUS_FONTWEIGHT_1002 = 'normal';

	$DFT_LINE_STATUS_1003_TEXT = 'Line producing';
	$DFT_LINE_STATUS_COLOR_1003 = '#0000A0';
	$DFT_LINE_STATUS_BGCOLOR_1003 = '#28A745';
	$DFT_LINE_STATUS_FONTWEIGHT_1003 = 'bold';

	$DFT_LINE_STATUS_1103_TEXT = 'Line producing';
	$DFT_LINE_STATUS_COLOR_1103 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1103 = '#4169E1';
	$DFT_LINE_STATUS_FONTWEIGHT_1103 = 'bold';

	$DFT_LINE_STATUS_1004_TEXT = 'Line is in error';
	$DFT_LINE_STATUS_COLOR_1004 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1004 = '#DC3545';
	$DFT_LINE_STATUS_FONTWEIGHT_1004 = 'normal';

	$DFT_LINE_STATUS_1104_TEXT = 'Line is in error (1104)';
	$DFT_LINE_STATUS_COLOR_1104 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1104 = '#DC3545';
	$DFT_LINE_STATUS_FONTWEIGHT_1104 = 'normal';


	$DFT_LINE_STATUS_1005_TEXT = 'Manuel';
	$DFT_LINE_STATUS_COLOR_1005 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1005 = '#ccccff';
	$DFT_LINE_STATUS_FONTWEIGHT_1005 = 'normal';

	$DFT_LINE_STATUS_1006_TEXT = 'Call job';
	$DFT_LINE_STATUS_COLOR_1006 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1006 = '#000000';
	$DFT_LINE_STATUS_FONTWEIGHT_1006 = 'normal';

	$DFT_LINE_STATUS_1007_TEXT = 'Linje offline';
	$DFT_LINE_STATUS_COLOR_1007 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1007 = '#000000';
	$DFT_LINE_STATUS_FONTWEIGHT_1007 = 'normal';

	$DFT_LINE_STATUS_1008_TEXT = 'Not in use';
	$DFT_LINE_STATUS_COLOR_1008 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1008 = '#000000';
	$DFT_LINE_STATUS_FONTWEIGHT_1008 = 'normal';

	$DFT_LINE_STATUS_1009_TEXT = 'Log';
	$DFT_LINE_STATUS_COLOR_1009 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1009 = '#000000';
	$DFT_LINE_STATUS_FONTWEIGHT_1009 = 'normal';

	$DFT_LINE_STATUS_1010_TEXT = 'Amount produced OK';
	$DFT_LINE_STATUS_COLOR_1010 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1010 = 'ForestGreen';
	$DFT_LINE_STATUS_FONTWEIGHT_1010 = 'normal';

	$DFT_LINE_STATUS_1011_TEXT = 'Amount produced ERROR';
	$DFT_LINE_STATUS_COLOR_1011 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1011 = '#ff0000';
	$DFT_LINE_STATUS_FONTWEIGHT_1011 = 'normal';

	$DFT_LINE_STATUS_1012_TEXT = 'Error on line';
	$DFT_LINE_STATUS_COLOR_1012 = '#000000';
	$DFT_LINE_STATUS_BGCOLOR_1012 = '#ff0000';
	$DFT_LINE_STATUS_FONTWEIGHT_1012 = 'normal';

	$DFT_LINE_STATUS_1013_TEXT = 'Break';
	$DFT_LINE_STATUS_COLOR_1013 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1013 = '#000000';
	$DFT_LINE_STATUS_FONTWEIGHT_1013 = 'normal';

	$DFT_LINE_STATUS_1014_TEXT = 'Setup 1014';
	$DFT_LINE_STATUS_COLOR_1014 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_1014 = '#0080FF';
	$DFT_LINE_STATUS_FONTWEIGHT_1014 = 'normal';

	$DFT_LINE_STATUS_1015_TEXT = 'Setup 1015';
	$DFT_LINE_STATUS_COLOR_1015 = '#000000';
	$DFT_LINE_STATUS_BGCOLOR_1015 = '#ff6347';
	$DFT_LINE_STATUS_FONTWEIGHT_1015 = 'normal';

	$DFT_LINE_STATUS_1016_TEXT = 'Commissioning';
	$DFT_LINE_STATUS_COLOR_1016 = '#000000';
	$DFT_LINE_STATUS_BGCOLOR_1016 = '#ff6347';
	$DFT_LINE_STATUS_FONTWEIGHT_1016 = 'normal';

	$DFT_LINE_STATUS_9999_TEXT = 'Unknown status';
	$DFT_LINE_STATUS_COLOR_9999 = '#ffffff';
	$DFT_LINE_STATUS_BGCOLOR_9999 = '#ff0000';
	$DFT_LINE_STATUS_FONTWEIGHT_9999 = 'bold';



?>